﻿using Marmat.Foundation;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Marmat.Foundation
{
    /// <summary>
    /// 菜单实体
    /// </summary>
    public class Menu : IMenu
    {
        /// <summary>
        /// 名称
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 文本
        /// </summary>
        public string Text
        {
            get => string.IsNullOrEmpty(text) ? Name : text;
            set => text = value;
        }
        private string text;

        /// <summary>
        /// 父节点的名称
        /// </summary>
        public string Parent { get; set; }

        /// <summary>
        /// 顺序
        /// </summary>
        public double Sequnce { get; set; }

        /// <summary>
        ///图标 
        /// </summary>
        public string Uri { get; set; }

        /// <summary>
        /// 点击事件
        /// </summary>
        public EventHandler ItemClick { get; set; }

        /// <summary>
        /// 菜单的参数信息。
        /// </summary>
        public object Argument { get; set; }
    }
}
